Contracting proofs to programs
نویسندگان
چکیده
This work describes a family of homomorphisms that contract natural deductions into typed ^-expressions, with the property that a convergence proof for an untyped program for function / is contracted to a typed program for /. The main novelties, compared to previous works on extracting algorithms from proofs, are the reading of deductions themselves as programs, and that instead of a constructive reading of 3, we use a Leibnitzian view of objects as sets of properties. The method is based on the observation that object-level components of natural deductions can be ignored computationally. It is applicable to every formalism in which there are no axioms or rules for objects in general, only for properties. Formalisms of this type include Peano's first order axiomatization of arithmetic (in its original fonn, with a primitive predicate identifier AO. second and higher order logic (in which data types, like the natural numbers, can be defined explicitly), and various variants of fixpoint extensions of first order logic. Among the technical offshoots of the method are very simple and transparent proofs of Guard's Theorem, that the provaWy recursive functions of second order arithmetic are all representaUe in the second order X-calculus, and of GOdel's "Dialectica" Theorem, that the provaMy recursive functions of first order arithmetic are all computable using primitive recursion in all finite types. This research was partially supported by ONR Grant N00014-844C-0415, and in part by the Defense Advanced Research Projects Agency (DOD), ARPA Order No. 4976, Amendment 20, under Contract Number F33615-87C-1499, monitored by the Avionics Laboratory, Air Force Wright Aeronautical Laboratories, Aeronautical Systems Division (AFCS), Wright-Patterson AFB, Ohio 45433-6543. The views and conclusions contained in this document are those of the author and should not be interpreted as representing the official policies, either expressed or implied, of ONR, DARPA, or the U.S. Government Introduct ion Most techniques for extracting the algorithmic contents of proofs fall into three methods. The interpretational method maps a formula ^ to a formula y that renders the constructive contents of is true. This is the method underlying Kleene's realizability interpretations, Godel's "Dialectica" interpretation, and Kreisel-Goodman's Theory of Constructions. The proof normalization method is based on the special form taken by normal proofs in semantic directed calculi for constructive theories, such as natural deductions for Intuitionistic (Heyting's) First Order Arithmetic. The key property used is existential instantiation: a normal proof of a formula 3x.[t/x] for some term r. The proof combinatorics method attempts to interpret a natural deduction proof as comprising an algorithm. The method is motivated by Curry and Howard's "formula as type" isomorphism [CF58,How80,Lau70,deB70], and underlies the programming language of Per Martin-L6f [Mar79], the family of PRL systems [Con86], and Coquand and Huet's Calculus of Constructions [CH88, Coq]. Our method is a variant, originating in [Lei83], of the proof combinatorics method. It is based on the observation that object-level components of natural deductions can be ignored computationally, leading to a homomorphism from proofs to typed programs, that extracts the computational contents of deductions. The underlying rationale goes back to Leibnitz: in a general setting where objects have a priori no special property, reasoning and computing are with respect to objects' properties, rather than over the objects themselves. The fact that an object x has property P will be reflected in the combinatorics of (potential) proofs of P{x). For instance, if N is a suitable rendition of the property of being a natural number, then a proof of N(x) will have a structure that reflects the construction of x. This approach is applicable to every formalism in which there are no axioms or rules for objects in general, only for properties. Formalisms of this type include Peano's first order axiomatization of arithmetic (in its original form, with a primitive predicate identifier N), second and higher order logic (in which data types, like the natural numbers, can be defined explicitly), and various variants of fixpoint extensions of first order logic. Our approach differs in important respects from previous works on proofs as programs, such as Martin-Lfif's Type Theory (MLTT). We disregard abstraction over individual objects, whereas object abstraction is at the core of the MLTT style. The constructive contents of proofs rests, for us, in the combinatorics of abstraction and application within proofs, in contrast to MLTT, where the constructive contents lies mainly in a constructive interpretation of existential quantification. Our approach is committed to a "semantic" view of typing (types as properties) as opposed to the "ontological" view of (most variants of) MLTT, where objects come equipped with their type. Finally, our method is particularly suited for reasoning about functions that are partial with respect to data types. Among the technical offshoots of the method are very simple and transparent proofs of Girard's Theorem, that the provably recursive functions of second order arithmetic are all representable in the second order A-calculus, and Godel's "Dialectica" Theorem, that the provably recursive functions of first order arithmetic are all computable using primitive recursion in all . finite types. We outline the use of our contraction homomorphisms for three types of calculi. In §§1-4 we present the method and some of its ramifications and applications for pure second order logic, which is mapped to Girard-Reynolds's pure second order A-calculus. We start with this instance of the method because the target formalism is a pure A calculus. In §5 we exhibit the method for a variant of Peano's Arithmetic and similar "generative axiomatizations" of inductively generated data types. §6 outlines applications to "inductive axiomatizations", based on first order inductive definitions. Finally, §7 touches on the contraction of second order proofs with restricted forms of comprehension, to second order typed A-expressions with restrictions on type arguments. Since we deal here with functions provable in second order logic, restricting comprehension leads to computational classes well below the provably recursive functions of first order arithmetic, such as the primitive recursive functions, the elementary, and the super-elementary functions [Lei89, Leia, Lei/3, Lei7]. A number of technical elaborations are factored out into appendices, to avoid distraction from the main development. The main results of §§1-3 were reported in [Lei83]. They were rediscovered by Krivine and Parigot [Kri86, KP87]. Closely related results are described in [Gir89] (see discussion following Theorem V below). The main results of §§4,5 are contained in §2 of [Lei84], and were reported in December 1983 at the Workshop on Logic in Computer Science at Brooklyn College of CUNY. Acknowledgements. I am grateful to Phokion Kolaitis, Georg Kreisel, Michel Parigot, Jonathan Seldin, and Paul Taylor for comments on a preliminary version of this work. Research partially supported by ONR grant N00014-84-K-0415 and by DARPA grant F33615-87-C-1499, ARPA Order 4976, Amendment 20.
منابع مشابه
On automating the extraction of programs from proofs using product types
Introduction • We are interested in programming language with the point of view: Proofs as Programs (Curry-Howard correspondence). Introduction • We are interested in programming language with the point of view: Proofs as Programs (Curry-Howard correspondence). • The specifications are the types and the lambda-terms are the extracted programs (the code). Introduction • We are interested in prog...
متن کاملInterval Temporal Logic on Natural Numbers
We introduce a theory of temporal logic operators using sets of natural numbers as time domain, formalized in a shallow embedding manner. The theory comprises special natural intervals (theory IL Interval: open and closed intervals, continuous and modulo intervals, interval traversing results), operators for shifting intervals to left/right on the number axis as well as expanding/contracting in...
متن کاملA Model for Sharing the Costs of Uncontrollable Risks among Contracting Parties
The allocation of risks among the contracting parties in a contract is an important decision affecting the project success. Some risks in a project are uncontrollable; these are imposed to a project by external factors. Since contracting parties can neither control nor affect the occurrence of such risks, their allocation to a party would be inequitable. Therefore the cost overrun related to un...
متن کاملNatural proofs versus programs optimization in the Calculus of Inductive Constructions
This paper presents how to automatically prove that an \opti-mized" program is correct with respect to a set of given properties that is a speciication. Proofs of speciications contain logical and computational parts. Programs can be seen as computational parts of proofs. They can thus be extracted from proofs and be certiied to be correct. The inverse problem can be solved: it is possible to r...
متن کاملAutomated Proof and Program Development
The aim of this paper is to present proof and program development in in-tuitionistic logic and attempt to automating this with tactics and strategies. It is important in computer science to have correct programs and much work has been devoted to this aspect. Typically, the study of the relationships between intuitionistic logic and computer science leads to the programming with proofs, i.e., ex...
متن کاملRecursive Programming with Proofs
There has been a lot of work based on the paradigm “proofs as programs”, leading to sophisticated realizations (see e.g. [2,4, 133). An expected benefit is the development of correct programs, but, so far, no programming language in current use came from these works. The difficulty is the apparent distance between proofs and programs: the proofs are often complicated and the extracted programs ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015